package com.xiangxiao.rpan.authority.dto;

import com.xiangxiao.rpan.authority.constant.ResponseCode;
import lombok.Data;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2023/3/21 19:50
 */
@Data
public class JsonObject {
  /**
   * 返回信息code对应的tag
   */
  public static final String RESPONSE_CODE_TAG = "respCode";

  /**
   * 返回信息message对应的tag
   */
  public static final String RESPONSE_MESSAGE_TAG = "respMessage";

  public static final String RESPONSE_REMARK_TAG = "respRemark";

  private int respCode = ResponseCode.RESULT_SUCCESS;

  private String respMessage;

  private String respRemark;

  private Object data;

  private int total;

  public JsonObject() {

  }

  public JsonObject(String message, int code, String remark, Object data, int total) {
    this.respCode = code;
    this.respMessage = message;
    this.respRemark = remark;
    this.data = data;
    this.total = total;
  }

  public JsonObject(String message, int code, String remark, Object data) {
    this.respCode = code;
    this.respMessage = message;
    this.respRemark = remark;
    this.data = data;
  }

  public JsonObject(String message, int code, String remark) {
    this.respCode = code;
    this.respMessage = message;
    this.respRemark = remark;
  }

  public JsonObject(String message, int code, Object data) {
    this.respCode = code;
    this.respMessage = message;
    this.data = data;
  }


  public JsonObject(Object data, int total) {
    this.data = data;
    this.total = total;
  }

  public JsonObject(String respMessage, int respCode) {
    this.respMessage = respMessage;
    this.respCode = respCode;
  }

  public JsonObject(Object data) {
    this.data = data;
  }
}
